home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 21
/
Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso
/
Aminet
/
comm
/
cnet
/
viewlog.lha
/
viewlog5
/
VL_UserLog
< prev
Wrap
Text File
|
1996-11-03
|
10KB
|
197 lines
/**************************************************************************\
$VER: User View Log, v5.01 (3-Nov-96) by Dotoran!
\**************************************************************************/
options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
tr=transmit ; se=sendstring ; gc=getchar ; gu=getuser ; mg=maygetchar
a='rexxsupport.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
ver="5.01" ; changewhere "UserViewLog"ver
tr "f1n3cfWelcome c6to cbView Logc6, c7vcf"ver"c6!"
se "n1caInitializingc6...c9" ; tw=0 ; call READCONFIG ; call CHECKVER
call CHECKTERM ; call READTITLES ; call READDATA
lo=1 ; hi=45 ; if hi>logs then hi=logs
if ascii=1 then signal VIEWASC
BEGIN: ; row=1 ; col=1 ; cols="12 32 52" ; r=1
tr "f1@4
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÄ
>
View Log
,
v"ver"
by
Dotoran
of
Frontiers BBS
<
ÄÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
tr " ÈÍÍ»
ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
ÉÍͼ"
tr " ÉÍͼ
ÛÛßCßÛÛ
ÈÍÍ»" ; tr " ÈÍÍ»
ÛÛCÛÛ
ÉÍͼ"
tr " ÉÍͼ
ÛÛCÛÛ
ÈÍÍ»" ; tr " ÈÍÍ»
ÛÛCÛÛ
ÉÍͼ"
tr " ÉÍͼ
ÛÛCÛÛ
ÈÍÍ»" ; tr " ÈÍÍ»
ÛÛCÛÛ
ÉÍͼ"
tr " ÉÍͼ
ÛÛCÛÛ
ÈÍÍ»" ; tr " ÈÍÍ»
ÛÛCÛÛ
ÉÍͼ"
tr " ÉÍͼ
ÛÛCÛÛ
ÈÍÍ»" ; tr " ÈÍÍ»
ÛÛCÛÛ
ÉÍͼ"
tr " ÉÍͼ
ÛÛCÛÛ
ÈÍÍ»" ; tr " ÈÍÍ»
ÛÛCÛÛ
ÉÍͼ"
tr " ÉÍͼ
ÛÛCÛÛ
ÈÍÍ»" ; tr " ÈÍÍ»
ÛÛCÛÛ
ÉÍͼ"
tr " ÉÍͼ
ÛÛCÛÛ
ÈÍÍ»" ; tr " ÈÍÍ»
ÛÛCÛÛ
ÉÍͼ"
tr " ÉÍͼ
ÛÛÜCÜÛÛ
ÈÍÍ»" ; tr " ÈÍÍ»
ÛÛÛÛÛÛ
ÛÛÛÛÛ
<
R
>
ead ALL Logs
ÛÛÛÛÛ
ÛÛÛÛÛÛÛ
ÉÍͼ" ; tr " ÉÍͼCÈÍÍ»"
tr " ÈÍÍÍÍÄ
>
Use
Arrow Keys
to
Move
,
<
ENTER
>
to
View
,
<
ESC
>
or
<
Q
>
to
Quit
<
ÄÍÍÍͼ
"
VIEWANS:
do i=lo to hi by 3 ; i2=i+1 ; i3=i+2
c="c7" ; if r/2=r%2 then c="cf"
se ""r+3";12H"c||center(logN.i,17)
se ""r+3";32H"c||center(logN.i2,17)
se ""r+3";52H"c||center(logN.i3,17)
r=r+1
end i
if lo>1&hi<90 then do ; do i=hi to 90 by 3
tr ""r+3";13H"copies(" ",55) ; r=r+1 ; end i ; end
se "9Hz4cf<caLog Names ceenclosed in cb*'s cdexist cepresentlycf>z0"
if hi<logs then do
se "13Hz4 53Hcf<cbNcf>cbext Screenz0";end
if lo>1 then do
se "13Hz4cf<cbPcf>cbast Screen53H z0";end
VIEWANS2: ; z=LOC() ; ex=" ";if exF.z=1 then ex="*"
tr ""row+3";"word(cols,col)"Hz5ce"ex||center(logN.z,15)ex"z0"
se "9H";gc;call CHECK;k=result;kk="";if k=d2c(27) then do;do 2;mg;kk=result;end;end
if (kk~="NOCHAR" & kk>"") | index("2468",k)>0 then do ; c="c7" ; if row/2=row%2 then c="cf"
tr ""row+3";"word(cols,col)"H"c||center(logN.z,17);oldz=z
if k=8 | kk="A" then do ; row=row-1 ; if row<1 then do ; row=16
do until logN.z>"" ; row=row-1 ; z=LOC() ; end ; end
signal VIEWANS2;end
if k=2 | kk="B" then do ; row=row+1 ; z=LOC()
if logN.z="" | row>15 then row=1
signal VIEWANS2;end
if k=6 | kk="C" then do ; col=col+1 ; z=LOC()
if logN.z="" | col>3 then col=1
signal VIEWANS2;end
if k=4 | kk="D" then do ; col=col-1 ; if col<1 then do ; col=4
do until logN.z>"" ; col=col-1 ; z=LOC() ; end ; end
signal VIEWANS2;end ; end
if c2d(k)=13 & exF.z=1 then do ; a=logI.z
if ar=1 then do ; call setclip("ARt",title.a) ; call setclip("ARi",a)
se "Hz4#0"ARpt" sysdata:log/"logF.z",4,e,b,9,5,e,1,0}"
call setclip("ARt") ; call setclip("ARi") ; end
else do ; tr "f1c6Now cbViewing c6the cf`ca"logN.z"cf' c6logc9:"
if title.a>"" then tr "n1z5ce"left(title.a,79)"z0"
tr "*0SysData:Log/"logF.z"}"
se "c7<c6Press cdANY KEY c6Nowc7>g1" ; end
signal BEGIN ; end
if k="R" then do
do i=1 to logs ; if exF.i=0 then iterate i ; else a=logI.i
if ar=1 then do ; call setclip("ARt",title.a) ; call setclip("ARi",a) ; call setclip("ARa","1")
se "Hz4#0"ARpt" sysdata:log/"logF.i",4,e,b,9,5,e,1,0}"
call setclip("ARt") ; call setclip("ARi") ; call setclip("ARa") ; end
else do ; tr "f1c6Now cbViewing c6the cf`ca"logN.i"cf' c6logc9:"
if title.a>"" then tr "n1z5ce"left(title.a,79)"z0"
tr "*0SysData:Log/"logF.i"}" ; end
se "2Hz4cePress <Q>uit, or ANY OTHER KEY for next log...z0"
gc;a=result;if a="Q" then leave i ; else tr "Hz4z0"
end i ; signal BEGIN ; end
if k="N"&hi<logs then do;r=1;row=1;col=1
lo=lo+45;hi=hi+45;if hi>logs then hi=logs;signal VIEWANS;end
if k="P"&lo>1 then do;r=1;row=1;col=1
lo=lo-45;hi=lo+44;signal VIEWANS;end
if k="Q"|kk="NOCHAR" then do;se "28HcbThanks c6for using caView Log c6today!"
exit;end
signal VIEWANS2
LOC: ; return (row*3+col-3)+(45*(lo>1))
READCONFIG:;gu 1311992;comP=result
call open(f1,comP"ViewLog5.cfg","r")
vers=readln(f1) ; macc=readln(f1)
uacc=readln(f1) ; trim=readln(f1) ; trln=readln(f1)
logH=readln(f1) ; hisP=readln(f1) ; hisT=readln(f1)
ETex=readln(f1)
AR=readln(f1);ARsy=readln(f1);ARpt=readln(f1)
call close(f1)
return
CHECKVER: ; if ver=vers then return
tr "f1n6c9Version Conflict:n1"
tr " `ViewLog5.cfg' version: v"vers
tr " `VL_UserLog' version: v"ver
tr "n1 BOTH files above need to be v"max(ver,vers)"!"
tr "n1 Please inform your SysOp of this..."
tr "n1Halting, due to conflicting versions..."
exit
READDATA: ; gu 15 ; ac=result ; acF.=0 ; exF.=0
if ~exists(comP"VL_Data") then do
se "n1c9I'm sorry, but the SysOp hasn't completely configured ViewLog "
tr "yet. Please leave feedback telling them this. Thanks!";exit;end
se "n1cbReading c6Logsc9: cd000h3"
call open(f1,comP"VL_Data","r") ; logN.="" ; logs=0
do i=1 until eof(f1) ; log.i=readln(f1) ; se "cd"right("cb"logs,6,"0")"<3"
parse var log.i 1 logI . 5 logN . 20 logF . 35 j . 50 uac" " .
if index(uac,ac)>0 then do ; logs=logs+1 ; logI.logs=logI
logN.logs=logN ; logF.logs=logF
exF.logs=exists("SysData:Log/"logF.logs) ; end
end i
call close(f1)
return
READTITLES:
call open(f1,comP"VL_Titles","r") ; title.=""
do i=1 until eof(f1) ; a=readln(f1) ; if ascii=0 then se TWIRL()
parse var a 1 v1 . 5 v2 . 17 v3 ; title.v1=v3 ; end i ; titles=i-1
call close(f1) ; tr "cdDonec6!"
return
TWIRL:;sh="--\\||//";tw=tw+1;if tw>8 then tw=1;return substr(sh,tw,1)"<1"
CHECKTERM: ; gu 27 ; lw=result ; if lw<80 then do
se "n2 I'm sorry, but you need to be using an 80 column terminal program "
se "in order to use this command. If you ARE using an 80 column terminal, then "
se "please check your Screen Width setting using the `"ETex"' command from any "
se "command prompt. Thank You.";exit;end
gu 28 ; term=result ; ascii=0 ; if term<2 | term=3 then do
se "n2 I notice that you are not set to use IBM-ANSI terminal emulation. "
se "Although it will still be possible for you to view logs created on this "
se "bbs when you are NOT in this mode, you'll be missing out on a lot of neat "
se "features and colors.n2 If you called using ANSI mode enabled in your terminal "
se "program, then you'll need to enable the ANSI parameters in your account "
se "on this bbs. You can do this by using the `"ETex"' command from any prompt."
se "n2Do you wish to view the logs in Ascii Mode now? [No]: "
gc;a=result;if a~="Y" then do;tr "No.";exit;end
else do;se "Yes!";ascii=1;end;end
return
VIEWASC:;c=1;lo=1;hi=45;if hi>logs then hi=logs
VIEWASC2:;tr "f1c7Ascii View Log, v"ver" by Dotoran of Frontiers! <*>=This Log Existsn1"
do i=lo to hi;se right(i,2)": <"substr(" *",exF.i+1,1)"> "left(logN.i,15)
c=c+1;if c=4 then do;tr;c=1;end;end i;se "n1";v1="";v2=""
if hi<logs then do;v1="N/";se "<N>ext 45 Logs, ";end
if lo>1 then do;v2="P/";se "<P>ast 45 Logs, ";end
tr "<R>ead ALL Existing Logs, [<ENTER>/<Q>uit]"
se "n1Enter Command or Log Number to View? ["v1||v2"R/Q/1-"logs"]: i1 2}"
gu 70;a=result;if a="R" then signal VIEWASC3
if a="N"&hi<logs then do;lo=lo+45;hi=hi+45;if hi>logs then hi=logs
signal VIEWASC2;end
if a="P"&lo>1 then do;lo=lo-45;hi=lo+44;signal VIEWASC2;end
if a=""|a="Q" then exit
if exF.a=0 then do
se "n1This log does not exist presently. <Key>g1";signal VIEWASC2;end
if datatype(a,'n')=1 then do;z=logI.a
tr "f1Now viewing the `"logN.a"' log:"
if title.z>"" then tr "n1"title.z
tr "*0SysData:Log/"logF.a"}"
se "<Press ANY KEY Now>g1"
signal VIEWASC ; end
signal VIEWASC
VIEWASC3:
do i=1 to logs
if exF.i=0 then iterate
z=logI.i ; tr "f1Now viewing the `"logN.i"' log:"
if title.z>"" then tr "n1"title.z
tr "*0SysData:Log/"logF.i"}"
se "Press <Q>uit, or ANY OTHER KEY to continue...";gc;a=result
if a="Q" then signal VIEWASC
end i
signal VIEWASC
CHECK:;if result~="###PANIC" then return result
a="Lost Carrier!";tr "1Hc9"a;logentry a;exit
SYNTAX:;ERROR:;IOERR:;e1=' Error: 'rc' ('errortext(rc)')'
e2=' Line: 'left(sigl,4)'File:';gu 1311992;a=result;gu 1311960
b=result;c='"'a||b'"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2
e=sourceline(sigl);do while e~='';e3='Source: 'left(e,37);tr e3
logentry e3;e=substr(e,38);end;bufferflush;exit
/**************************************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/